package cloud.dandanit.itservice.controller.banner;

import cloud.dandanit.itservice.config.limitCurrentConfig.RateLimit;
import cloud.dandanit.itservice.entity.Banner;
import cloud.dandanit.itservice.service.BannerService;
import cloud.dandanit.itservice.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.support.atomic.RedisAtomicInteger;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 前台查看幻灯片
 * @Author luokai
 */
@Api("前台查看幻灯片")
//@CrossOrigin
@RestController
@RequestMapping("/itservice/bannerfront")
@SuppressWarnings("AlibabaCommentsMustBeJavadocFormat")
public class BannerFrontController {

    @Autowired
    private BannerService bannerService;

    //获取首页
    @ApiOperation(value = "获取首页banner")
    @GetMapping("getIndexBanner")
    public R getIndexBanner() {

        List<Banner> list = bannerService.getIndexBannerList();
        return R.ok().data("list", list);
    }
}
